/**
 *
 *	<p>Title:UserController</p>
 *	<p>Description:</p>
 *	<p>Company:www.axjy.com</p>
 *	@date 		2017年10月9日 上午9:04:59
 *	@author 	yue
 *	@version 	1.0
 */
package com.axjy.service.impl;


import java.util.List;

import java.util.TreeMap;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.axjy.mapper.QuanXianMapper;
import com.axjy.pojo.Manager;
import com.axjy.pojo.QuanXian;
import com.axjy.pojo.QuanXianFeiLei;
import com.axjy.service.QuanXianService;

/**
 *
 *	<p>Title:UserController</p>
 *	<p>Description:</p>
 *	<p>Company:www.axjy.com</p>
 *	@date 		2017年10月9日 上午9:04:59
 *	@author 	yue
 *	@version 	1.0
 */
@Service
@Transactional
public class QuanXianServiceImpl implements QuanXianService{

	@Resource
	private QuanXianMapper quanXianMapper;
	@Override
	public TreeMap<QuanXianFeiLei, List<QuanXian>> getQuanXian(Manager manager,List<Integer> list) {
		
		TreeMap<QuanXianFeiLei, List<QuanXian>> map = new TreeMap<QuanXianFeiLei, List<QuanXian>>();
		for(Integer i:list) {
			List<QuanXian> qList = quanXianMapper.getFenLei(manager,i);
			
			map.put(quanXianMapper.getQuanXianById(i), qList);
		}
		return map;
	}

	@Transactional(readOnly=true)
	@Override
	public List<Integer> get(Manager manager) {
		return quanXianMapper.get(manager);
	}

	@Transactional(readOnly=true)
	@Override
	public List<QuanXian> getFenLei(Manager manager,Integer flId) {
		
		return quanXianMapper.getFenLei(manager,flId);
	}


	
}
